package com.chinaoryx.web;

import java.util.Date;

import nl.justobjects.pushlet.core.Event;
import nl.justobjects.pushlet.core.EventPullSource;
import nl.justobjects.pushlet.util.Rand;

public class MyEventSource extends EventPullSource {
	@Override
	protected long getSleepTime() {
		return Rand.randomLong(3000, 5000);
	}
	@Override
	protected Event pullEvent() {
		Event event = Event.createDataEvent("/chat");
		event.setField("msg", new Date().toString());
		return event;
	}
}
